add decoding functionality and DriverTest