writing and reading statepoints works