Some changes for right search method