improving the main exec