setattr functions when make instances