added example codes from class