calculating errors of methods