replace lamch with numeric_limits