added UUID generator
the first working version.
data structure needs refactoring to make it a lot clearer.