straightened out alter_length for header