cursors working corectly