another goal would be to support restarting