implementing length extension