refactoring
threads parsing