added reference var to new hook