updates main file