changed length to uselength