added schedule check function and route handler