attempt refactoring to get error message to get remove