use skip functions on decode
add support for virtual function free encode/decode