Added hooks functions