implemented sparse first order reverse mode for models with loops