add testing mode
remove keyboard mode testing
handle invalid action type