Added  code from np system