change attributes to attr as attribute is reserved