updated collatz to be more dynamic