Added get function for length.