output length adjusted