refactoring captain script 1 - separated each event into its own file