working version of cs m117 project