Adapts to many pages, no need for else ifs for every page