This is the reworked lesson3 with functions.  I am not done but havemade some good progress.