bad implementation of wait_until is not working yet