unused variable error on `r` is getting flagged here.