more work on decode stuff...

more work on decode stuff...