finding without using arrays