Average BPM code added