Added binaryTransform function