environmental decoder added into Encode.hs