added perm.class function