messages function finish
Need to fix messages method