formula to find length - Search