work on generalizing storeNewMessage
make test for more generalized storeNewMessage
storeNewMessage generalized to handle some parameters