Get rid of the recursiveness.