Code for the CS169 class