Migrate NPS code in