updating the generation script
need to fix within spatial range