adding save result function
adjustable block size & search range