changed baseVal manipulation to setAttribute