changed the check for name