Adding possibility for custom binning for variables from Eric's work