implemented removal functionality