made compatible with diagrams-0.6