improved constructor performance