Correcting a bug in tolerance and adding surcos application