you should definitely rewrite it with linear