refactor Collatz func into Collatz class
refactor Collatz func into Collatz class