refactored unit