refactoring with prototypes
fixed scoping issue in launch() method caused by previous refactoring