Got adding terms logic working.