Added cursor functionality.