separated TouchPatternListener into its own file