created a file for averagerate function codes