replaced float with uchar