now with weighted average