Also you don't need `int r;` declaration anymore.