using the correct way of setting a node attribute