adding gem magic_encoding