texts adjusted, page order logic optimized (slightly hacked, should be refactored later)