hide button on last page and filters functional