Pull request.
Merge pull request #3 from prostohz/master

Logic extension