we should use warnings.warn instead of print statements

should this raise an exception?