changed NEST script to be compatible with spikey script