did a little refactoring
started implementing terms