simple sorting and analytics, currently broken