add support for 3 byte length