add to_a methos for stats and allow sorting in dashboard ui