Revision of Amal's master thesis