fix the concurrency bug of work; add prototype of boolean