added printArrayHorizontally - tested