added sorting, previous and next buttons to front page