renamed setParameters to setAttributes in Resource