optimized frequency generation