cs5400: base code for final project