now to implement good sorting