added the average exercise for ruby