It is already working the J function and the grad for multi variables