refactor code for app launch logic
refactor code for app launch logic - class