Getting started with actual function wrapper. Seems to decode,
needs testing though..