add the definition for Lock
add definition for Write Buffer
mimicking the usage of Record, state is now a "Record"