Dispatch the commands into methods