add retry, closes #43