worked on messaging function
messages