added event handling and basic moves