this is the first round working - i intend to redo tomorrow and commit at each stage - currently adding comments to aid my understanding and background of problem to be solved