print arrays correctly