major refactoring to change to event driven model with specs