added scaleProperties, added logic for complex selectors