update math structure