Improve frequency API