sort and compare updates