use setter in constructor