updated with lecture examples