Using __call__ magic method to implement callbacks