improved the cursor behavior and swapped j and k