Version 2 & Created sendMessage method to seperate functions