add removeOccurrence in repair.cpp