Metro: make the calculations truly generic