succesfully implemented simple npc class in lua