fix: thread starvation due to interdependency
refactoring