some example code, not finished, just sketches