code for TIM211 @UCSC course project