reimpl of max points on a line