homework for CS227