refactor dim()
move debug printing functions onto the Interpreter