Actually added average calculation, etc.