rewrite of attribute handling