Added Ex-5. Implemented 1-4 tasks.