guarding timer if freq is 0, moved calculation to read