adding check in the console line parser for valid array indexes