Added clap detector code