add multi-term support