creating a function create_message