Modified the union and intersection in services.js
Modified test case to reflect this fix.