added a dedicated named method on D called log for logging purposes.
kept the invoke method and made it a delgator to log method