finished implementating acid-state