added threshold, polylinear gradient