RRL implementation, iteration 2