Add the ability to store data with a lock

have data be a let and use contexts for tests