cursor-based points algorithm