Add possibility for setting max no. of hits