debugged and made the code compile
Merge pull request #121 from liafailboy/working

debugged and made the code compile