Added first three codes with working functionality.