Calculate length better.