getting rid of empty pages