use match instead of repr
Merge pull request #85 from camillobruni/develop

Fix issue 58 and pull request 76