corrected LEAF and added specialized add/sub/scale functions