refactor and fix partial attempts handling