Refactored __call__ method.