Added intersection function