node statemachine in progress
beat refactor in progress
major refactoring