made update to algo