For Collatz project, CS371p