Added input handling when receiving messages
Implemented input handling++