clean up "combinesWith" function