major refactoring, remove apply2trace kwarg