add traffic check function