Maybe we should create and update a global variable to control which metrics data we will use inside these functinon?