added mean calculation and display