make all tests pass after rafactor and re-structure