adds modifications from videolesson 3