added receive message function
removed receiveMessage function call