Funcitoning recursive chop function, tests pass