added isnonlinear control for convenience