clean up, nesting functions in the veg data