added removeLastOccurenceOf method