using setAttribute rather than value