refactored callMethod