algorithm can now be restarted with restart argument