unified frequency update function