added sorting functionality
optimized local report