using better syntax changing the objectify method to a toJSON method