separate lock added instead of using self