calculating needed units works