Added function to extract a subset of features