remove wait func