added lock in analytics