fixing bug in is_pandigital fn