Multi threading added