Speed up the code, from 1/s to 1700/s