lock implementation. pass the simple test.
TODO: need to modify the test case. How to test it easier?
add one assert and TODO information