implement reverse iteration with option instead of its own function