updated mode script