wrote the closestFlower() method