will make this solution not parallel but with thread using