register until it succeeds

Added a TODO