added more functions
added more functions
Modified Ex1 and Ex2