sort update now also passes the indexes from and to from which the elements have changed the position