added two functions to NPC.cpp