Added append_attributes function.