stream with easy median value query