Added lock()