separate clean and update index