added uint16_t support