change how sent messages are inserted into the database slightly