changed to ValueError since the problem is clearly related to the input and not some random internal process we cannot clearly name