Added intersection check