CSCI580_Fall_2014: 2 version of homwwork3. ALL FINISHED!!!