rewrote a main file