Added the first version of tolerance calculations