updated code to clip based on shapefile