fixing bug i noticed in main file