midterm R submission updates
added R codes