aggregating common R funcitons