speed up but not the fastest algorithm, we can search the only alpha string to reduce the unnecessary operations