frquency

updated frequency with error checks