main is simpler