refactor wolfram a bit to handle disambiguation cases