introduce private method valid_tolerance?, refactor log method - dont set reduntant local variables