Used a matcher instead of if else statement
Merge pull request #37 from rossh/master

#30 Used a matcher instead of if else statement