added before dep hook