Copied files from lecture examples