added cmp, fac and abs functions