rename length to remaining