callback after entering a message