changed tolerance and added print statement