refactored check for first & last name