Setting up the correct environnment and parameters ==================================================