proper linear searching