R - behind the scenes