renaming single_attempt variable to single_pass