main func changes