gradient still not implemented fot there is an  undefined gradient