made a functino to search the chain list