update by checking db columns