added code for conditioning number