add some gem and apply magic_encoding