completed the stub R files