work in progress
more WIP, added unit tests, simplified design and assumptions
more WIP, added unit tests, simplified design and assumptions