messages saving to DB