setValueByPath refactring