modified halftone functions