update var name, print stmts to methods