rewrote program