move waitOn result iteration into the wait method