optimize console app