Playing with sorting loops