slightly optimized unit building