remove uneeded pages