Added heart rate monitor code