eliminated auxiliary function `prevs`