refactor heart rate monitor test