Added averaging, for what it's worth