integrated code with trent's. stable with bugs: next buttons incrememnted on run. next pages dont work