Renamed g->r and added content to r