added support for cursors