length protocol