ninja and samurai to class ref