refactor Cursor.take