working mainfile