page deletion logic