changes to handle_commands