Making script 10000000x faster