added before hook to require promise lib