reentrant lock added.