rename handle_message to handle_frame