Optimizing incentives in online homework