added sorting for slideshow and transactions