master split into state and messaging