basic command handling structure