Merge pull request #5 from edwardcapriolo/callback-for-state

Callback for state