running average functionality added, fixed minor glitch in test