use more generic data for defaults
remove local variables and use node attributes directly in resource