Adding set hook.