adapted changes made by Jordane on the 25th of August