Much more elegant way, not showing hidden pages