major refactoring - many tests specified