remove unneeded pages