made the algorithm much faster