Eliminate duplicated logic.
Merge pull request #13 from snkinard/method-call

Eliminate duplicated logic.