add auto apply
fix frequency computing