move Ajax calls outside getNpc() to improve performances