Changes on demo 3 and 4, added demo 5.