minor change to class design to simplify coding