restructuring, attempt to add test framework