algorithm changes