better multipage code