use "ReentrantLock" instead of "synchronized"