better way to wait