befor removing the scheule mode code