validating commands