finish demo, store message to db