Working, sorting and printing everything out