Homework for cs256.