updated Unit class