added find_max_min_points func