fixed ivy integration. still need to perfect the json format