working on adding multipage functionality