adding frequency control