convert the execution hook into a decorator to allow composition