added input validation to role name