fixed unit tests and responded to code review feedback