Wrote code and comments for assignment