getting closer to qqmath like functionality