introduce concept of initial state

create test for read function
add code that gets initial state from read function