code cleanup
remove old wait_for method, rename wait_for2 → wait_for