added search logic in commons