simplified mean calculation