refactoring and prettifying
changed state record name
wip on external enterface