register until it succeeds

added a TODO