Change the interface for pre- and post- hooks