fixed extendFeatures function