made active pages to each when they are selected