skipping writing attribute if it already is correct