updated sort