Added customizable mode hook