added rough code for validity of numberlist