added r stuff