from .prepare to .toJSON