add unescape function for initial state