passing pixelStruct as argument