modify SuperPixel to class and pass tests