update target logic