about to rewrite but this is first working version for tut 2
better rewrite, I think
tidier version
remove needless code
changes
bug fixes