converting numbers to tuples