added data validation to the cmds