Connecting variants to functions