updated includes.h  and sampleBased Patch Class