tmpmean stores values as vector