Assignment9 for CS254