subsetFunc function

this function is needed due to R dropping the names when it subsets