added description of problem, had input.char_arry update after calling rank on input