added support for arrow keys