add with, change toJSON method