handle optional parameters, handle delete index when delete log