changes in algorithm for better performance