take out unused length variables