Adopted cyvmath changes