use int instead of int16_t in API