api now just takes a command and processes that
executing command functionality
changing M to B