x was not defined if linear=False