could you do the matching fully here ? (i.e. get rid of the `rc` variable above)