changed getAttributes and setAttributes signatures