added some command handling