fixed math library for delinerize code