improved state restore + added abort