added cs520 code