added pitch decection js