learning how to use arrays and index