Updating Main Loop