started to work towards a solution. The variable are defined.
commit
commit 2