modified main routine to endless