in the process of updating intersection check- to be recursive