copied from olfiles/auonomous/auto6.c