add two parameters to control the running time of top-k detection