add the cancel stuff for the frequency query
add frequency queries to history