improving launcher code