Move functions to enable hook