initial commit of somewhat working code
put it to work on example