put slicing stuff back in and added check for overlapping subs with no basevar