Created handle_message and get_messages functions and tested handle_message