Fixed mean to use "size" instead of calculating it