tested for an hour, seems to have fixed bug, mainRoutine stopped before starting