added conditional to class