reorder params
move code out of testing section
halp-comment the testing code with effects on terp.global_env
move def