add npc functionality