refactoring
CalculateAndWriteToDb kamel shod,va field haye mohasebati ro ham mohasebe mikone