changing arrays to strings and back