write spec and solution for square_arrays; error test currently not working