messages functional