working arraylist-to-string and string-to-arraylist methods for logging