Some helper functions and a new message to handle