added attribute struct and fixed addTag