added naive frequency system