fix after changing get grams from file