added for assignment 3. doggy codes. last question failed with unknown reason.