Add square function.