optimized where constructor