modified the perso_type logic