coded IntegrateModeMedium, includes fancy bells and whistles like mirrorfactor and automatic hxyz calculation. not sure if gives the right result though!