Code written for the NSPN project