changing unitClass to optional