A little tool to decode & encode for MA