Ruih/use arrays to reduce repetition