modification to delete in createLayerPoints