function for valid name implemented