refactoring

* refactor list into keys makes more sense
* added throw error on undefined call commands
* added test for throw error in undefined call command