Homework done for AI 335/435