hooked messages up to the front end