Merge pull request #23 from cmanou/master

Found some bugs fixed them and added a feature