adds test case to send a hello message, and bug fixes to make it work