Copied compare from OLAPCube here

Still need to change OLAPCube to use it