Make decode function compatible with API
Merge pull request #31 from shannonturner/development

Make decode function compatible with API