Refactor
use json.