Implemented working solution.  Needs some cleanup