use delay, need a better solution