better use of local search and time measure