cleaned up most of the r code for movie network