finding closest mean for a point