adding SELF_TYPE check to new_class