added weighted average example