making a start with DecodeZ()

just a skeleton now