Got rid of the loop. Achieved 1.08 sec.
Updated README.md