add aggregate and scalar functions