input and output of messages