Added minor changes with more conditionnals