updates to message system - made more secure