correct solution for maxPoints