homework with array