better code, bugfix
Merge pull request #103 from vladpupaza/radu.moldovan/branch

better code, bugfix