add attrs and events