some changes to make it run
some mor changesome mor changes
Merge pull request #1 from foliern/master

some bugs fixed