added .toJSON() and .parse()