Added lock to protect the list