first attempt to do some kind of state calculation