Added the possibility for metric to be int|float