some folks prefer non-single-lettered variable names. try `res` instead of `r`.