code use to study for COP final