Removed a redundent function. Also, actual execution time is like 0.5