Add wait_for. Fixes #370 #373