functionallity for adding new messages locally