convert to new hook system