take out attribute setting outside constructors