first working version

Now we need to clean this up