First version of accept without recursive calls.