add support for the decode function