changed cursor api to be cleaner & flatter, support unbounded scans