draft1 of complete launcher code