using Messagee example as a basis