This makes it clear that only the final "r_data" is being changed. Also rename a variable to be less vague.