restructure npc class