added setfreq()
added pruinit()