cs251 prog04 complete