error tolerance as parameter for functions