Implemented MaxMax algorithm for wsi