constructor optimization