finish search by code