CS298 Code