added functions section for hook