pulled label extraction into its own script