change check for validname