more work on State and Message implementation