unit tests have to be refactored