removed unnecessary variable assignment in main loop