features: handle masks for feature extraction