This is the r code from 11-19-2014