using a message construct to hold the state