ref int distance = plant