add lock, new thread