In the process of implementing locking. Still need to do search