add search range
search from array print start and end instead of res
edit search range