RRL implementation, iteration 1