vector.average, update old code
more documentation