Updated to be faster