Add shared lock, now need to implement in memory