Created first version of getCursorPosition function.