updated jewel-warrior code