Improved speed of update method
Added Caching and using bisect to insert