New method may improve treatment for irregular heart rate