put back parse_length functions