work on the command handling mechanism