Implemented combine_command function.