a uncompleted solution for max_points