simplify command handling