Writing dynamic attributes