put block of code below in a dedicated function, e.g., `validate_license`