simple sort and analysis