fix return codes checks
test intersection