fixing multiple page problem - attempt 1