added subcommand checking