added cursor funcionality