add functionality to PirateName class to encode/decode names as JSON strings
save to local storage and retrieve names from it at the beginning of the app