rebuild math