read input arguments and do the search on launch
make init a function and run it separated from the main definition