beautify replace math stuff