Come on now. This is a flippin' take home exam -- meaning you need to do this yourself, else you'll be cheating. Locking this question.