use json instead of pickle