Adding date and delete message inside rendermessage function