notes on sorting