Decoding part work (part 1)