Added aggregate and assign functions