adding associations for messages and ratings