improved averaging
Added debug option
Changed version number