modify exception management
with open(...) as in_s

in_s need close???
add timeit function to test algorithm performance