improve debugsystem