code/decode scripts working properly now