fixed bug: added check for b is null
added retainAll and removeAll