refactoring + add traffic support