change JSON to prototype