change input variable from targetPosition to level