added some logic to song detection