added when_all
changed order of when arguments