use pinning, added lock