saving incoming messages to DB