User functions with scalar output (vector output assigns only last component)