implement prev and next passes