defined #to_json method