testing works for liear search