update commuting calculation