Update chainage.cpp