Using arrays and methods