added writeattribute methode