final decode code