CAL-684 improve get previous occurrence result