reworked frequency handling