added a sime program for calculating average