first working alpha
expanded test coverage and fixed bugs