calculating lenght like glencora..