added closest_max method to Array