add support for pre and post provider hooks