added arrow and row movement and control