update chartbeat code