use lodash intersection and union functions. fixes #2.