added union
renamed scalar functions to functions