moves all subcommands to functions