working on message functions