got the polygon intersection to work correctly