add optimization for linear action