added rules and tests
Merge pull request #165 from mimmi20/issue-162

Issues 162, 163 and 164