storeNewMessage generalized to handle some parameters