removes pageId variable and postpones $filename