improved Math entension