Added iteration for avarage calculation purposes