refactor, replaced gob by json