refactor state usage
stateT fmaap