refactor dict and string(not finish yet)