trying to make error catching better
tentative change for modified removability algorithm
uncommented out modify