Began implementing process_command function