updated version of pivottable