small change to record_terminal, added collatz programs