project done for CS 301 at William and Mary