changing input variable to array variable